import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import Home from '../views/Home.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path: '/demo',
    name: 'Demo',
    component: () => import('../views/Demo.vue')
  },
  {
    path: '/demo2',
    name: 'Demo2',
    component: () => import('../views/Demo2.vue')
  },
  {
    path: '/demo3',
    name: 'Demo3',
    component: () => import('../views/Demo3.vue')
  },
  {
    path: '/xlsx',
    name: 'Xlsx',
    component: () => import('../views/xlsx.vue')
  },
  {
    path: '/excel',
    name: 'Excel',
    component: () => import('../views/exceljs/exceljs.vue')
  },
  {
    path: '/echarts',
    name: 'Echarts',
    component: () => import('../views/echartsDemo.vue')
  },
  {
    path: '/attrs',
    name: 'Attrs',
    component: () => import('../views/attrs/attrs.vue')
  },
  {
    path: '/newAPI',
    name: 'NewAPI',
    component: () => import('../views/newAPI.vue')
  },
  {
    path: '/demoParents',
    name: 'DemoParents',
    component: () => import('../views/demoParents.vue')
  },
  {
    path: '/demoPeity',
    name: 'DemoPeity',
    component: () => import('../views/peity.vue')
  },
  {
    path: '/peityInfo',
    name: 'PeityInfo',
    component: () => import('../views/peityInfo.vue')
  },
  {
    path: '/roll',
    name: 'Roll',
    component: () => import('../views/roll.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
